<template>
  <div class="cl">
    <header-nav :index_num="index_num"></header-nav>
    <div id="excute_box">
      <!--内容-->
      <div class="excute_con">
        <h3>一、项目申报书</h3>
        <p>
          <a :href="over.probook">{{over.probook?over.probook.split('/')[8]:'未上传'}}</a>
          <!-- <a :href="over.probook" target="_blank" v-if="over.probook">预览</a> -->
          <a
            v-if="over.probook"
            :href="over.probook"
            target="_blank"
          >{{over.probook?(over.probook.split('/')[8].split('.')[1] == 'pdf'||over.probook.split('/')[8].split('.')[1] == 'jpeg'||over.probook.split('/')[8].split('.')[1] == 'png'||over.probook.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'):''}}</a>
        </p>

        <h3>二、立项批复文件</h3>
        <p>
          <a :href="over.pifu">{{over.pifu?over.pifu.split('/')[8]:'未上传'}}</a>
          <!-- <a :href="over.fangan" target="_blank" v-if="over.fangan">预览</a> -->
          <a
            v-if="over.pifu"
            :href="over.pifu"
            target="_blank"
          >{{over.pifu.split('/')[8].split('.')[1] == 'pdf'||over.pifu.split('/')[8].split('.')[1] == 'jpeg'||over.pifu.split('/')[8].split('.')[1] == 'png'||over.pifu.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
        </p>

        <h3>三、项目合同及实施方案(盖章扫描版)</h3>
        <p>
          <a :href="over.fangan">{{over.fangan?over.fangan.split('/')[8]:'未上传'}}</a>
          <!-- <a :href="over.fangan" target="_blank"  v-if="over.fangan">预览</a> -->
          <a
            v-if="over.fangan"
            :href="over.fangan"
            target="_blank"
          >{{over.fangan.split('/')[8].split('.')[1] == 'pdf'||over.fangan.split('/')[8].split('.')[1] == 'jpeg'||over.fangan.split('/')[8].split('.')[1] == 'png'||over.fangan.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
        </p>
        <h3>
          <!-- <span style="color:red;margin-right:10px;position:relative;right:3px">*</span>  -->
          四、街道（地区办事处）关于2019年社会建设资金购买社会组织服务结项材料的说明
        </h3>
        <!-- <p>
          <a :href="over.explain">{{over.explain?over.explain.split('/')[8]:'未上传'}}</a>
          <a
            v-if="over.explain"
            :href="over.explain"
            target="_blank"
          >{{over.explain.split('/')[8].split('.')[1] == 'pdf'||over.explain.split('/')[8].split('.')[1] == 'jpeg'||over.explain.split('/')[8].split('.')[1] == 'png'||over.explain.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
        </p> -->

        <h3>五、项目实施各阶段情况报告</h3>
        <!--月度报告）-->
        <!-- <p>
          <a :href="over.location">{{over.location?over.location.split('/')[8]:'未上传'}}</a>
          &nbsp;&nbsp;&nbsp;
          <a
            v-if="over.location"
            :href="over.location"
            target="_blank"
          >{{over.location.split('/')[8].split('.')[1] == 'pdf'||over.location.split('/')[8].split('.')[1] == 'jpeg'||over.location.split('/')[8].split('.')[1] == 'png'||over.location.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
           <DivisionLabor 
                    @divisionLabor="plement"
                    :divisionLaborVal="over.pro_condition"
                    :writeable="false"
          ></DivisionLabor>-->
          <!-- <a href="#">未上传</a> -->
          <!-- <a :href="over.pro_condition" download="" v-if="over.pro_condition">下载</a>
          <a :href="over.pro_condition" target="_blank" v-if="over.pro_condition">预览</a>-->
        <!-- </p> -->
        <!-- <h3>六、中期评估报告</h3>
        <p>
          <span>
            <a href="#">下载</a> |
            <a href="#">预览</a>
          </span>
        </p>-->

             <h3>
          <!-- <span style="color:red;margin-right:10px;position:relative;right:3px">*</span>  -->
         六、中期整改报告
        </h3>
        <!-- <p>
          <a :href="over.assess">{{over.assess?over.assess.split('/')[8]:'未上传'}}</a>
          <a
            v-if="over.explain"
            :href="over.explain"
            target="_blank"
          >{{over.assess.split('/')[8].split('.')[1] == 'pdf'||over.assess.split('/')[8].split('.')[1] == 'jpeg'||over.assess.split('/')[8].split('.')[1] == 'png'||over.assess.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
        </p> -->
        <h3>七、末期自评报告</h3>
        <!--（绩效报告）-->
        <!-- <h3>1、基本信息</h3>
        <aside>
          <div class="baseinfo">
            <label style="margin-left:27px">项目名称:</label>
            <p class="right" style="right:12px">{{over.name}}</p>
          </div>
          <div class="baseinfo">
            <label class="left">机构名称:</label>
            <p class="right">{{over.company}}</p>
          </div>
          <div class="baseinfo">
            <label class="left">申请日期:</label>
            <p
              class="right"
            >{{new Date(over.aterm*1000).getFullYear()+'-'+(new Date(over.aterm*1000).getMonth()+1)+'-'+new Date(over.aterm*1000).getDate()}}--{{new Date(over.fterm*1000).getFullYear()+'-'+(new Date(over.fterm*1000).getMonth()+1)+'-'+new Date(over.fterm*1000).getDate()}}</p>
          </div>-->
          <!-- <div>
            <label class="left" style="font-size:20px">1、项目执行团队人员构成及分工:</label>
            <p v-html="over.people"></p>
          </div> -->
        <!-- </aside>  -->

          <div class="mid_box">
          <!-- <h3>
            <span style="color:red;margin-right:10px;position:relative;right:3px">*</span>2、项目发展性状况
          </h3> -->
          <!-- <div class="rich"> -->
            <!-- {{subMidVal}}zzzzzz -->
            <!-- <DivisionLabor @divisionLabor="plement" :divisionLaborVal="over.develop" :writeable="true"></DivisionLabor> -->
            <!-- <sub-mid @subMid="subMid" :subMidVal="subMidVal"></sub-mid> -->
            <!-- <p v-html="over.develop"></p> -->
          <!-- </div> -->
        </div>

         <!-- <h3>3、项目实施情况</h3> -->
        <!-- <DivisionLabor @divisionLabor="plement" :divisionLaborVal="over.pro_condition" :writeable="false"></DivisionLabor> -->
        <!-- <h3>2、发展性状况</h3> -->
        <!-- <p></p> -->
        <!-- <h3>3、项目实施情况</h3> -->
        <!-- <p>{{over.pro_condition}}</p> -->
        <!-- <p v-html="over.pro_condition"></p> -->
        <!-- <DivisionLabor
                    @divisionLabor="plement"
                    :divisionLaborVal="over.pro_condition"
                    :writeable="false"
        ></DivisionLabor>-->

        <!-- <h3>4、项目取得的成就</h3> -->
        <!-- <p v-html="over.result"></p> -->
        <!-- <DivisionLabor @divisionLabor="plement" :divisionLaborVal="over.result" :writeable="false"></DivisionLabor> -->
        
        <!-- <h3>5、对项目实施至今的情况总结</h3> -->
        <!-- <p>{{ over.summary }}</p> -->
        <!-- <p v-html="over.summary"></p> -->
        <!-- <DivisionLabor @divisionLabor="plement" :divisionLaborVal="over.summary" :writeable="false"></DivisionLabor> -->
        <!-- <h3>
          6、项目财务报告
          <span class="download">
            <a :href="over.fina">{{over.fina?over.fina.split('/')[8]:'未上传'}}</a>
            &nbsp;&nbsp;&nbsp;
            <a
              v-if="over.fina"
              :href="over.fina"
              target="_blank"
            >{{over.fina.split('/')[8].split('.')[1] == 'pdf'||over.fina.split('/')[8].split('.')[1] == 'jpeg'||over.fina.split('/')[8].split('.')[1] == 'png'||over.fina.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
          </span>
        </h3> -->
        <!-- <h3>
          7、结项电子报告
          <span class="download">
            <a :href="over.elereport">{{over.elereport?over.elereport.split('/')[8]:'未上传'}}</a>
            &nbsp;&nbsp;&nbsp;
            <a
              v-if="over.elereport"
              :href="over.elereport"
              target="_blank"
            >{{over.elereport.split('/')[8].split('.')[1] == 'pdf'||over.elereport.split('/')[8].split('.')[1] == 'jpeg'||over.elereport.split('/')[8].split('.')[1] == 'png'||over.elereport.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
          </span>
        </h3> -->
        <h3>
          八、项目调整申请及批复
          <!-- <span class="download">
            <a :href="over.adjust">{{over.adjust?over.adjust.split('/')[8]:'未上传'}}</a>
            &nbsp;&nbsp;&nbsp;
            <a
              v-if="over.adjust"
              :href="over.adjust"
              target="_blank"
            >{{over.adjust.split('/')[8].split('.')[1] == 'pdf'||over.adjust.split('/')[8].split('.')[1] == 'jpeg'||over.adjust.split('/')[8].split('.')[1] == 'png'||over.adjust.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
    
          </span> -->
        </h3>
        <!-- JSON.parse() -->
        <h3>九、末期评审参评资料</h3>
        <div v-if="over.ziliao">
          <span
            class="download"
            v-for="(item,index) in over.ziliao"
            :key="index"
            style="display:block;margin: 20px 0"
          >
            <span style="color:#000;margin-right:20px;">项目资料{{index+1}}:&nbsp;&nbsp; {{item.name}}</span>
            <a :href="item.elereport">{{item.elereport?item.elereport.split('/')[8]:'未上传'}}</a>
            &nbsp;&nbsp;&nbsp;
            <a
              v-if="item.elereport"
              :href="item.elereport"
              target="_blank"
            >{{item.elereport.split('/')[8].split('.')[1] == 'pdf'||item.elereport.split('/')[8].split('.')[1] == 'jpeg'||item.elereport.split('/')[8].split('.')[1] == 'png'||item.elereport.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
           
          </span>
        </div>

        <h3>
          十、附件1：调研报告
          <!-- <span class="download">
            <a :href="over.pro_result">{{over.pro_result?over.pro_result.split('/')[8]:'未上传'}}</a>
            &nbsp;&nbsp;&nbsp;
            <a
              v-if="over.pro_result"
              :href="over.pro_result"
              target="_blank"
            >{{over.pro_result.split('/')[8].split('.')[1] == 'pdf'||over.pro_result.split('/')[8].split('.')[1] == 'jpeg'||over.pro_result.split('/')[8].split('.')[1] == 'png'||over.pro_result.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
          </span> -->
        </h3>
        <h3>
           十一、附件2：满意度分析报告
          <!-- <span class="download">
            <a :href="over.pro_result">{{over.pro_result?over.pro_result.split('/')[8]:'未上传'}}</a>
            &nbsp;&nbsp;&nbsp;
            <a
              v-if="over.pro_result"
              :href="over.pro_result"
              target="_blank"
            >{{over.pro_result.split('/')[8].split('.')[1] == 'pdf'||over.pro_result.split('/')[8].split('.')[1] == 'jpeg'||over.pro_result.split('/')[8].split('.')[1] == 'png'||over.pro_result.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
          </span> -->
        </h3>
        <!-- <h3>
          十、财务管理制度
          <span class="download">
            <a :href="over.manage">{{over.manage?over.manage.split('/')[8]:'未上传'}}</a>
            &nbsp;&nbsp;&nbsp;
            <a
              v-if="over.manage"
              :href="over.manage"
              target="_blank"
            >{{over.manage.split('/')[8].split('.')[1] == 'pdf'||over.manage.split('/')[8].split('.')[1] == 'jpeg'||over.manage.split('/')[8].split('.')[1] == 'png'||over.manage.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
          </span>
        </h3> -->
        <!-- <h3>
          十一、项目经费表、决算表
          <span class="download">
            <a :href="over.money">{{over.money?over.money.split('/')[8]:'未上传'}}</a>
            &nbsp;&nbsp;&nbsp;
            <a
              v-if="over.money"
              :href="over.money"
              target="_blank"
            >{{over.money.split('/')[8].split('.')[1] == 'pdf'||over.money.split('/')[8].split('.')[1] == 'jpeg'||over.money.split('/')[8].split('.')[1] == 'png'||over.money.split('/')[8].split('.')[1] == 'jpg'?'预览':'下载'}}</a>
          </span>
        </h3> -->
      </div>
    </div>
    <footer-nav class="footer"></footer-nav>
  </div>
</template>
<script>
import HeaderNav from "../../components/HeaderNav";
import FooterNav from "../../components/FooterNav";
const path = require("path");
const files = require.context("@/components", false, /\.vue$/);
const modules = {};
files.keys().forEach(key => {
  const names = path.basename(key, ".vue");
  modules[names] = files(key).default || files(key);
});
// eslint-disable-next-line no-unused-vars
var preD = function(e) {
  e.preventDefault();
};
export default {
  components: modules,
  data() {
    return {
      index_num: 2,
      sub: 0,
      name: " ",
      info: ["1"],
      zDatc: [],
      zDatb: [],
      dataFile: null,
      id: null,
      fileName: null,
      over: {},
      probook: ""
    };
  },
  created() {
    this.GetListImg();
  },
  methods: {
    plement() {},
    aterm() {},
    fterm() {},
    getData() {
      this.$http({
        method: "post",
        url: "v1/project/details",
        data: {
          id: this.id
        }
      })
        .then(res => {
          console.log(res, 234568);

          if (res.data.data.code === 200) {
            this.zDatc = res.data.data.data.ProjectDetails;
            console.log(this.zDatc, 256);
          } else {
            alert("请求失败！");
          }
        })
        .catch(err => {
          console.log(err);
        });
    },
    getOver() {
      this.$http({
        method: "get",
        url: "v1/pro/center",
        params: {
          // id: 83,
          id: this.$route.query.id,
          category: "over"
        }
      })
        .then(res => {
          // console.log(res,500)
          if (res.data.data.code === 200) {
            console.log(res.data.data.data[0].status)
            if(res.data.data.data[0].status == 1000){
              let data = res.data.data.data[0];
              this.over = data;
            }else{
              this.$message.error("当前页面未提交暂时无法查看！");
                this.$router.push({ path: `/schedule${this.id}` });
            }
            
            console.log(data, "1111");
            // console.log(this.over.probook.split('/')[8],500)
            //   var index = file.response.data.url.lastIndexOf(".");
            // var filetype = file.response.data.url.substr(index + 1);
          } else {
            this.$message.error("当前页面未提交暂时无法查看！");
            this.$router.push({ path: `/schedule${this.id}` });
          }
        })
        .catch(err => {
          console.log(err);
        });
    }
  },
  // eslint-disable-next-line no-dupe-keys
  created() {
    this.id = this.$route.query.id;
    this.getData();
    this.getOver();
  }
};
</script>
<style lang="scss" scoped>
.baseinfo {
  // min-width:180px;
  display: flex;
  .right {
    margin-left: 15px;
    margin-bottom: 20px;
    position: relative;
    top: -5px;
  }
  .left {
    margin-left: 29px;
  }
}
#excute_box {
  width: 100%;
  .excute_con {
    width: 1200px;
    margin: 0 auto;
    padding: 80px 30px;
    background: white;
    margin-top: 50px;
    margin-bottom: 50px;
    h3 {
      line-height: 260%;
      font-size: 20px;
    }
    p a {
      line-height: 10%;
      color: #7471ef;
      font-size: 14px;
      margin-right: 10px;
    }
    p {
      font-size: 14px !important;
      margin-left: 33px;
      line-height: 33px !important;
    }
    label {
      // margin-left: 16px;
      font-family: "MicrosoftYaHei";
      font-size: 14px;
      font-weight: normal;
      font-stretch: normal;
      line-height: 25px;
      letter-spacing: 0px;
      color: #333333;
      // text-align: right;
      display: inline-block;
      // font-size: 20px;
      // width: 200px;
    }
    input {
      box-sizing: border-box;
      width: 33.8%;
      height: 35px;
      background-color: #ffffff;
      border: solid 1px #c7c7c7;
      outline: none;
      margin-left: 35px;
      margin-bottom: 15px;
      font-family: "MicrosoftYaHei";
      font-size: 18px;
      font-weight: normal;
      font-stretch: normal;
      letter-spacing: 0px;
      color: #323232;
      margin-right: 35px;
    }
    .division {
      width: 76%;
    }
    span {
      font-size: 18px;
    }
    span a {
      color: #7471ef;
    }
    p {
      font-size: 17px;
      color: #666;
      line-height: 30px;
    }
    .download {
      color: #7471ef;
      padding-left: 30px;
      font-size: 14px;
    }
  }
}
</style>
